<template>
	<view class="">
		<view class="bar_top">
			<view class="search">
				<view class="search_input">
					<image src="/static/images/search.png" mode=""></image>
					<input type="text" value="" placeholder="请输入关键词"/>
				</view>
				<view class="search_btn">搜索</view>
			</view>
		</view>
		
		<view class="item_list">
			
			
			<view class="item_box"  v-for="(item,index) in userList" v-key="index">
				<view class="item_title" @click="showTap(index)">
					<view>{{item.title}}</view>
					<image src="/static/images/right.png" class="right"></image>
				</view>
				<view class="item_item_list" v-show="num==index?true:false" v-for="(items,indexs) in item.user_list" v-key="indexs">
					<view class="item_item">
						<!-- <image src="" mode=""></image> -->
						<view class="item_item_text">
							<view>{{items.mobile}}</view>
							<view>{{items.username}}</view>
						</view>
					</view>
				</view>
			</view>
		</view>
		
		<view class="bottom_btn">
			<view class="bottom_btn_list">
				<view @tap="go('add')">派单</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default{
		data(){
			return{
				userList:[],
				status:false,
				num:-1
			}
		},
		
		onLoad() {
			this.getData()
		},
		methods:{
			getData(){
				this.$api.getUserList().then(res => { // 执行人
					console.log(res)
					this.userList = res
					  
				})
			},
			showTap(index){
				this.num = index;
				this.status = !this.status
				console.log(index)
				console.log(this.num)
				
				// this.status= !this.status
			}
		}
	}
</script>

<style>
	.item_list{margin-top: 100upx;}
	.item_box{width: 100%;border-bottom: 2upx solid #EEEEEE;background: #FFFFFF;}
	.item_title{width: 100%;height:100upx;display: flex;flex-direction: row;align-items: center;font-size:32upx;color: #333333;padding: 0 30upx;box-sizing: border-box;}
	.item_title_num{width: 40upx;height: 40upx;background: rgba(4,155,255,0.1);font-size: 28upx;color: #049BFF;line-height: 40upx;text-align: center;margin-left: 20upx;}
	.item_title image{margin-left: auto;background: #F1F1F1;}
	.item_item_list{width: 100%;padding: 0 30upx;box-sizing: border-box;background-color: #FFFFFF;}
	.item_item{width: 100%;border-top: 2upx solid #EEEEEE;height: 110upx;display: flex;flex-direction: row;align-items: center;font-size: 28upx;color: #333333;}
	.item_item image{width: 84upx;height: 84upx;border-radius: 50%;background: #EEEEEE;margin-right: 20upx;}
	.item_item_text view:nth-child(2){margin-top: 10upx;font-size: 24upx;color: #9BA7B7;}
	
	
</style>
